<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }

        .box{
            width: 1200px;
            height: 500px;
            background-color: rgb(199, 255, 255);
            margin: 0 auto;
            position: relative;
            overflow: hidden;
            /* filter: blur(8px); */
        }
        .mask{
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgb(255, 255, 255, 0.5);
            /* backdrop-filter: blur(8px); */
             filter: blur(20px);
        }

        .dot{
            position: absolute;
            opacity: 0;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            
        }

        .anime{
            animation: bl 8s ease-in-out;
        }

        .dot1{
            top: 10%;
            left: 30%;
            background-color: rgb(252, 61, 61);
        }

        .dot2{
            top: 20%;
            left: 10%;
            background-color: rgb(240, 250, 50);
            animation-delay: 3s;
        }

        .dot3{
            top: 40%;
            left: 53%;
            background-color: rgb(50, 250, 67);
            animation-delay: 5s;
        }

        .dot4{
            top: 70%;
            left: 70%;
            background-color: rgb(250, 50, 227);
            animation-delay: 2s;
        }

        .dot5{
            top: 56%;
            left: 80%;
            background-color: rgb(63, 50, 250);
            animation-delay: 4s;
        }

        @keyframes bl {
            0%{
                opacity: 0.3;
                transform: scale(1);
            }
            50%{
                opacity: 0.8;
                transform: scale(1.5);
            }
            100%{
                opacity: 0;
                transform: scale(2);
            }
        }

        
    </style>
</head>
<body>
    
    <div class="box">
        <div class="mask">
            <span class="dot dot1"></span>
            <span class="dot dot2"></span>
            <span class="dot dot3"></span>
            <span class="dot dot4"></span>
            <span class="dot dot5"></span>
        </div>
    </div>

    <script>
        const aDot=document.querySelectorAll('.dot')

        function rand(min,max){
            return parseInt(Math.random()*(max-min+1)+min)
        }

        aDot.forEach((el,i)=>{
            el.classList.add('anime')
            el.addEventListener('animationend',function(){
                el.classList.remove('anime')
                el.style.left=`${rand(i*20,i*20+20)}%`
                el.style.top=`${rand(i*20,i*20+20)}%`
                setTimeout(function(){
                    el.classList.add('anime')
                },10)
                
            })
        })
    </script>
</body>
</html>